<?php

class Application_Form_modifierdefcolonne extends Zend_Form
{

    public function init()
    {
        /* Form Elements & Other Definitions Here ... */
    	
    	$this->setName("Formulairemodifierdefcolonee");
    	
    	$id = new Zend_Form_Element_Hidden('idPILOT_DEFCOLUMN');
    	$id->setLabel('');
    	
    	
    	
    	$chartaxe = new Zend_Form_Element_Text('CHART_AXE');
    	$chartaxe->setLabel('Axe chart');
    
    	$ISCHART = new Zend_Form_Element_Text('ISCHART');
    	$ISCHART->setLabel('ISCHART');
    	
    	$axenom = new Zend_Form_Element_Text('AXENOM');
    	$axenom->setLabel('Nom d\'axe');
    	
    	$mapper= new Application_Model_Mapper_PilotListcolumn();
    	$select=$mapper->fetchAllToArray();
    	 
    	 
    	$tmp=array();
    	$tmp['']="selectionner definition de colonne";
    	foreach ($select as $key => $value ){
    		$tmp[ $value['idPILOT_LISTCOLUMN'] ] = $value['COLUMNNAME'];
    	}
    	$listModelActivite = array("multiOptions" => $tmp);
    	 
    	$listcolonne= new Zend_Form_Element_Select('idPILOT_LISTCOLUMN',  $listModelActivite);
    	$listcolonne->setLabel('Liste colonne')	;
    	
    	$mapper= new Application_Model_Mapper_PilotRequest();
    	$select=$mapper->fetchAllToArray();
    	
    	
    	$tmp=array();
    	$tmp['']="selectionner une requette";
    	foreach ($select as $key => $value ){
    		$tmp[ $value['idPILOT_REQUEST'] ] = $value['LABELRequest'];
    	}
    	$listModelActivite = array("multiOptions" => $tmp);
    	
    	$request= new Zend_Form_Element_Select('PILOT_REQUEST_idPILOT_REQUEST',  $listModelActivite);
    	$request->setLabel('Requette')	;
    	
    	$mapper= new Application_Model_Mapper_PilotAxes();
    	$select=$mapper->fetchAllToArray();
    	 
    	 
    	$tmp=array();
    	$tmp['']="selectionner un axe";
    	foreach ($select as $key => $value ){
    		$tmp[ $value['idPILOT_AXES'] ] = $value['idPILOT_AXES'];
    	}
    	$listModelActivite = array("multiOptions" => $tmp);
    	 
    	$axe= new Zend_Form_Element_Select('PILOT_AXES_idPILOT_AXES',  $listModelActivite);
    	$axe->setLabel('Axe')	;
    	
    	$valider = new Zend_Form_Element_Submit("submit");
    	$valider->setLabel("Modifier");
    	
    	$this->addElements(array($id,$request,$listcolonne,$axe,$axenom,$chartaxe,$ISCHART,$valider));
    	$this->setDecorators( array( array('ViewScript', array('viewScript' => 'protypeform.phtml'))));
    	
    	
    	
    }


}

